home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 44 / PC Actual CD 44.iso / OctagonEurope / BarThread.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-11-22  |  1.3 KB  |  64 lines

  1. class BarThread implements Runnable {
  2.    Instabase parent;
  3.    Thread barThread;
  4.    // $FF: renamed from: jj int
  5.    int field_0 = 1;
  6.    int oldj = 1;
  7.    boolean loop;
  8.    // $FF: renamed from: wS java.lang.String
  9.    String field_1 = new String(">");
  10.    int par = 1;
  11.  
  12.    public BarThread(Instabase var1) {
  13.       this.parent = var1;
  14.    }
  15.  
  16.    public void start() {
  17.       this.loop = true;
  18.       if (this.barThread == null) {
  19.          this.barThread = new Thread(this);
  20.          this.barThread.start();
  21.       }
  22.  
  23.    }
  24.  
  25.    public void stop() {
  26.       this.loop = false;
  27.  
  28.       for(this.field_0 = 0; this.field_0 < 10; ++this.field_0) {
  29.          this.parent.lbar[this.field_0].hide();
  30.       }
  31.  
  32.       this.parent.label_bar.hide();
  33.       this.barThread = null;
  34.    }
  35.  
  36.    public void run() {
  37.       while(this.loop) {
  38.          this.parent.update(this.parent.getGraphics());
  39.          this.parent.lbar[this.oldj].setText("");
  40.          this.parent.lbar[this.field_0].setText(this.field_1);
  41.          this.oldj = this.field_0;
  42.          this.field_0 = this.par + this.field_0 % 8;
  43.  
  44.          try {
  45.             Thread.sleep(100L);
  46.          } catch (InterruptedException var1) {
  47.          }
  48.  
  49.          if (this.oldj == 8) {
  50.             this.par = -1;
  51.             this.field_0 = 7;
  52.             this.field_1 = "<";
  53.          }
  54.  
  55.          if (this.oldj == 1) {
  56.             this.par = 1;
  57.             this.field_0 = 2;
  58.             this.field_1 = ">";
  59.          }
  60.       }
  61.  
  62.    }
  63. }
  64.